import lite.mobile.lib.key.Keyboard;
import lite.mobile.lib.utils.Delegate;
import lite.mobile.lib.WeeUIMain;

/**
 * @author alibber
 * @ 按键管理类
 */
class lite.mobile.lib.key.KeyManager {
	private static var instance : KeyManager;
	public static function getInstance() : KeyManager {
		if(instance == null) {
			instance = new KeyManager();
		}
		return instance;
	}

	public var keyListener : Object;

	public function interceptKey() : Void {
		//WeeUIMain.getInstance().getStage()
		Key.addListener(keyListener);
		keyListener = new Object();
		keyListener.onKeyUp = Delegate.create(this, __keyUp);
	}

	private function __keyUp() : Void {
		var code:Number = Keyboard.getKeyCode();
	}
}
